**************** Maintaing Ethnic Dominance ****************

xtset CCODE YEAR

****Table I****

*Model 1
xtpcse CIRI l.CIRI ELF ///
l.EXCONST l.LNGDPCAP l.LNPOP ///
l.LNOILGAS l.ARMCON i.YEAR i.REGION ///
, p het
 
*Model 2
xtologit PTS i.l.PTS ELF ///
l.EXCONST l.LNGDPCAP l.LNPOP ///
l.LNOILGAS l.ARMCON i.YEAR i.REGION ///
, vce(r)

*Model 3
xtpcse CIRI l.CIRI POLAR ///
l.EXCONST l.LNGDPCAP l.LNPOP ///
l.LNOILGAS l.ARMCON i.YEAR i.REGION  ///
, p het
 
*Model 4
xtologit PTS i.l.PTS POLAR ///
l.EXCONST l.LNGDPCAP l.LNPOP ///
l.LNOILGAS l.ARMCON i.YEAR i.REGION ///
, vce(r)

*Model 5
xtpcse CIRI l.CIRI l.EXCL ///
l.EXCONST l.LNGDPCAP l.LNPOP ///
l.LNOILGAS l.ARMCON i.YEAR i.REGION ///
, p het

*Model 6
xtologit PTS i.l.PTS l.EXCL ///
l.EXCONST l.LNGDPCAP l.LNPOP ///
l.LNOILGAS l.ARMCON i.YEAR i.REGION ///
, vce(r)
 
 
****Table II****
 
*Model 7
xtpcse CIRI l.CIRI l.EXCL ELF ///
l.EXCONST l.LNGDPCAP l.LNPOP ///
l.LNOILGAS l.ARMCON i.YEAR i.REGION ///
, p het
 
*Model 8
xtpcse CIRI l.CIRI l.EXCL ///
l.EXCONST l.LNGDPCAP l.LNPOP ///
l.LNOILGAS l.ARMCON  l.DISSENT l.CIVILLIB i.YEAR i.REGION ///
, p het

*Model 9
xtpcse CIRI l.CIRI l.EXCL ///
l.EXCONST l.LNGDPCAP l.LNPOP ///
l.LNOILGAS l.ARMCON  i.l.AUTOC i.YEAR i.REGION ///
, p het

*Model 10
xtpcse CIRI l.CIRI l.EXCL ///
l.EXCONST l.LNGDPCAP l.LNPOP ///
l.LNOILGAS l.ARMCON  i.l.AUTOC i.YEAR i.CCODE ///
, p het

*model 11
ivregress 2sls CIRI l.CIRI ///
l.EXCONST l.LNGDPCAP l.LNPOP ///
l.LNOILGAS l.ARMCON i.YEAR i.REGION (lEXCL=SETTMORT) ///
, vce(r)
estat firststage, all
weakivtest


*model 12
ivregress 2sls CIRI l.CIRI ///
l.EXCONST l.LNGDPCAP l.LNPOP ///
l.LNOILGAS l.ARMCON i.YEAR i.REGION (lEXCL=ELF) ///
, vce(r)
estat firststage, all
weakivtest

*overidentification test
ivregress 2sls CIRI l.CIRI ///
l.EXCONST l.LNGDPCAP l.LNPOP ///
l.LNOILGAS l.ARMCON i.YEAR i.REGION (lEXCL=SETTMORT ELF) ///
, vce(r)
estat firststage, all
estat overid

	 
****Table III****

	*Lag variables
	gen lEXCONST = EXCONST[_n-1]
	gen lLNOILGAS =LNOILGAS[_n-1]
	gen lCIRI = CIRI[_n-1]
	gen lLNGDPCAP = LNGDPCAP[_n-1]
	gen lLNPOP = LNPOP[_n-1]
	gen lARMCON = ARMCON[_n-1]
	gen lAUTOC = AUTOC[_n-1]
	tab lAUTOC, gen(lAUTOC)
	
	*Country and year dummies
	xtpcse CIRI l.CIRI l.EXCL ///
	l.EXCONST l.LNGDPCAP l.LNPOP ///
	l.LNOILGAS l.ARMCON  i.l.AUTOC i.YEAR i.CCODE ///
	, p het
	gen FEMODEL = e(sample)

	tab CCODE if FEMODEL==1, gen(cc)
	tab YEAR if FEMODEL==1, gen(y)

*Simulating parameters
estsimp reg CIRI lCIRI lEXCL ///
lEXCONST lLNGDPCAP lLNPOP lLNOILGAS lARMCON ///
lAUTOC1 lAUTOC2 lAUTOC3 lAUTOC4 ///
cc1 cc2 cc3 cc4 cc5 cc6 cc7 cc8 cc9 cc10 cc11 cc12 cc13 cc14 cc15 cc16 cc17 cc18 cc19 cc20 cc21 cc22 cc23 cc24 cc25 cc26 cc27 cc28 cc29 cc30 cc31 cc32 cc33 cc34 cc35 cc36 cc37 cc38 cc39 cc40 cc41 cc42 cc43 cc44 cc45 cc46 cc47 cc48 cc49 cc50 cc51 cc52 cc53 cc54 cc55 cc56 cc57 cc58 cc59 cc60 cc61 cc62 cc63 cc64 cc65 cc66 cc67 cc68 cc69 cc70 cc71 cc72 cc73 cc74 cc75 cc76 cc77 cc78 cc79 cc80 cc81 cc82 cc83 cc84 cc85 cc86 cc87 cc88 cc89 cc90 cc91 cc92 cc93 cc94 cc95 cc96 cc97 cc98 cc99 cc100 cc101 cc102 ///
y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 y17 y18 y19 y20 y21 y22 y23 y24 y25 y26 y27 y28 y29
	   
*Ethnic exclusion	
setx  	(lCIRI lEXCONST lLNGDPCAP lLNPOP lLNOILGAS lARMCON ///
		lAUTOC1 lAUTOC2 lAUTOC3 lAUTOC4 ///
		cc1 cc2 cc3 cc4 cc5 cc6 cc7 cc8 cc9 cc10 cc11 cc12 cc13 cc14 cc15 cc16 cc17 cc18 cc19 cc20 cc21 cc22 cc23 cc24 cc25 cc26 cc27 cc28 cc29 cc30 cc31 cc32 cc33 cc34 cc35 cc36 cc37 cc38 cc39 cc40 cc41 cc42 cc43 cc44 cc45 cc46 cc47 cc48 cc49 cc50 cc51 cc52 cc53 cc54 cc55 cc56 cc57 cc58 cc59 cc60 cc61 cc62 cc63 cc64 cc65 cc66 cc67 cc68 cc69 cc70 cc71 cc72 cc73 cc74 cc75 cc76 cc77 cc78 cc79 cc80 cc81 cc82 cc83 cc84 cc85 cc86 cc87 cc88 cc89 cc90 cc91 cc92 cc93 cc94 cc95 cc96 cc97 cc98 cc99 cc100 cc101 cc102 ///
		y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 y17 y18 y19 y20 y21 y22 y23 y24 y25 y26 y27 y28 y29) /// 
		mean (lEXCL) min
simqi, pv

setx  	(lCIRI lEXCONST lLNGDPCAP lLNPOP lLNOILGAS lARMCON ///
		lAUTOC1 lAUTOC2 lAUTOC3 lAUTOC4 ///
		cc1 cc2 cc3 cc4 cc5 cc6 cc7 cc8 cc9 cc10 cc11 cc12 cc13 cc14 cc15 cc16 cc17 cc18 cc19 cc20 cc21 cc22 cc23 cc24 cc25 cc26 cc27 cc28 cc29 cc30 cc31 cc32 cc33 cc34 cc35 cc36 cc37 cc38 cc39 cc40 cc41 cc42 cc43 cc44 cc45 cc46 cc47 cc48 cc49 cc50 cc51 cc52 cc53 cc54 cc55 cc56 cc57 cc58 cc59 cc60 cc61 cc62 cc63 cc64 cc65 cc66 cc67 cc68 cc69 cc70 cc71 cc72 cc73 cc74 cc75 cc76 cc77 cc78 cc79 cc80 cc81 cc82 cc83 cc84 cc85 cc86 cc87 cc88 cc89 cc90 cc91 cc92 cc93 cc94 cc95 cc96 cc97 cc98 cc99 cc100 cc101 cc102 ///
		y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 y17 y18 y19 y20 y21 y22 y23 y24 y25 y26 y27 y28 y29) /// 
		mean (lEXCL) max
simqi, pv

*Executive constraint   
setx  	(lCIRI lEXCL lLNGDPCAP lLNPOP lLNOILGAS lARMCON ///
		lAUTOC1 lAUTOC2 lAUTOC3 lAUTOC4 ///
		cc1 cc2 cc3 cc4 cc5 cc6 cc7 cc8 cc9 cc10 cc11 cc12 cc13 cc14 cc15 cc16 cc17 cc18 cc19 cc20 cc21 cc22 cc23 cc24 cc25 cc26 cc27 cc28 cc29 cc30 cc31 cc32 cc33 cc34 cc35 cc36 cc37 cc38 cc39 cc40 cc41 cc42 cc43 cc44 cc45 cc46 cc47 cc48 cc49 cc50 cc51 cc52 cc53 cc54 cc55 cc56 cc57 cc58 cc59 cc60 cc61 cc62 cc63 cc64 cc65 cc66 cc67 cc68 cc69 cc70 cc71 cc72 cc73 cc74 cc75 cc76 cc77 cc78 cc79 cc80 cc81 cc82 cc83 cc84 cc85 cc86 cc87 cc88 cc89 cc90 cc91 cc92 cc93 cc94 cc95 cc96 cc97 cc98 cc99 cc100 cc101 cc102 ///
		y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 y17 y18 y19 y20 y21 y22 y23 y24 y25 y26 y27 y28 y29) /// 
		mean (lEXCONST) min
simqi, pv

setx  	(lCIRI lEXCL lLNGDPCAP lLNPOP lLNOILGAS lARMCON ///
		lAUTOC1 lAUTOC2 lAUTOC3 lAUTOC4 ///
		cc1 cc2 cc3 cc4 cc5 cc6 cc7 cc8 cc9 cc10 cc11 cc12 cc13 cc14 cc15 cc16 cc17 cc18 cc19 cc20 cc21 cc22 cc23 cc24 cc25 cc26 cc27 cc28 cc29 cc30 cc31 cc32 cc33 cc34 cc35 cc36 cc37 cc38 cc39 cc40 cc41 cc42 cc43 cc44 cc45 cc46 cc47 cc48 cc49 cc50 cc51 cc52 cc53 cc54 cc55 cc56 cc57 cc58 cc59 cc60 cc61 cc62 cc63 cc64 cc65 cc66 cc67 cc68 cc69 cc70 cc71 cc72 cc73 cc74 cc75 cc76 cc77 cc78 cc79 cc80 cc81 cc82 cc83 cc84 cc85 cc86 cc87 cc88 cc89 cc90 cc91 cc92 cc93 cc94 cc95 cc96 cc97 cc98 cc99 cc100 cc101 cc102 ///
		y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 y17 y18 y19 y20 y21 y22 y23 y24 y25 y26 y27 y28 y29) /// 
		mean (lEXCONST) max
simqi, pv

*Armed conflict
setx  	(lCIRI lEXCL lLNGDPCAP lLNPOP lLNOILGAS lEXCONST ///
		lAUTOC1 lAUTOC2 lAUTOC3 lAUTOC4 ///
		cc1 cc2 cc3 cc4 cc5 cc6 cc7 cc8 cc9 cc10 cc11 cc12 cc13 cc14 cc15 cc16 cc17 cc18 cc19 cc20 cc21 cc22 cc23 cc24 cc25 cc26 cc27 cc28 cc29 cc30 cc31 cc32 cc33 cc34 cc35 cc36 cc37 cc38 cc39 cc40 cc41 cc42 cc43 cc44 cc45 cc46 cc47 cc48 cc49 cc50 cc51 cc52 cc53 cc54 cc55 cc56 cc57 cc58 cc59 cc60 cc61 cc62 cc63 cc64 cc65 cc66 cc67 cc68 cc69 cc70 cc71 cc72 cc73 cc74 cc75 cc76 cc77 cc78 cc79 cc80 cc81 cc82 cc83 cc84 cc85 cc86 cc87 cc88 cc89 cc90 cc91 cc92 cc93 cc94 cc95 cc96 cc97 cc98 cc99 cc100 cc101 cc102 ///
		y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 y17 y18 y19 y20 y21 y22 y23 y24 y25 y26 y27 y28 y29) /// 
		mean (lARMCON) min
simqi, pv

setx  	(lCIRI lEXCL lLNGDPCAP lLNPOP lLNOILGAS lEXCONST ///
		lAUTOC1 lAUTOC2 lAUTOC3 lAUTOC4 ///
		cc1 cc2 cc3 cc4 cc5 cc6 cc7 cc8 cc9 cc10 cc11 cc12 cc13 cc14 cc15 cc16 cc17 cc18 cc19 cc20 cc21 cc22 cc23 cc24 cc25 cc26 cc27 cc28 cc29 cc30 cc31 cc32 cc33 cc34 cc35 cc36 cc37 cc38 cc39 cc40 cc41 cc42 cc43 cc44 cc45 cc46 cc47 cc48 cc49 cc50 cc51 cc52 cc53 cc54 cc55 cc56 cc57 cc58 cc59 cc60 cc61 cc62 cc63 cc64 cc65 cc66 cc67 cc68 cc69 cc70 cc71 cc72 cc73 cc74 cc75 cc76 cc77 cc78 cc79 cc80 cc81 cc82 cc83 cc84 cc85 cc86 cc87 cc88 cc89 cc90 cc91 cc92 cc93 cc94 cc95 cc96 cc97 cc98 cc99 cc100 cc101 cc102 ///
		y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 y17 y18 y19 y20 y21 y22 y23 y24 y25 y26 y27 y28 y29) /// 
		mean (lARMCON) max
simqi, pv

**************** Online Appendix ****************
  
****Table AI****
sum CIRI PTS ELF POLAR EXCL ///
EXCONST LNGDPCAP LNPOP LNOILGAS ///
ARMCON DISSENT CIVILLIB if YEAR>1976 & YEAR<2011
 
****Table AII****
corr CIRI PTS ELF POLAR EXCL ///
EXCONST LNGDPCAP LNPOP LNOILGAS ///
ARMCON DISSENT CIVILLIB if YEAR>1976 & YEAR<2011
 
****Table AIII****
 
*Model 1
xtologit CIRI i.l.CIRI ELF ///
l.EXCONST l.LNGDPCAP l.LNPOP ///
l.LNOILGAS l.ARMCON i.YEAR i.REGION ///
, vce(r)

*Model 3
xtologit CIRI i.l.CIRI POLAR ///
l.EXCONST l.LNGDPCAP l.LNPOP ///
l.LNOILGAS l.ARMCON i.YEAR i.REGION ///
, vce(r)

*Model 5
xtologit CIRI i.l.CIRI l.EXCL ///
l.EXCONST l.LNGDPCAP l.LNPOP ///
l.LNOILGAS l.ARMCON i.YEAR i.REGION ///
, vce(r)

*Model 7
xtologit CIRI i.l.CIRI l.EXCL ELF ///
l.EXCONST l.LNGDPCAP l.LNPOP ///
l.LNOILGAS l.ARMCON i.YEAR i.REGION ///
, vce(r)

*Model 8
xtologit CIRI i.l.CIRI l.EXCL ///
l.EXCONST l.LNGDPCAP l.LNPOP ///
l.LNOILGAS l.ARMCON l.DISSENT l.CIVILLIB i.YEAR i.REGION ///
, vce(r)

*Model 9
xtologit CIRI i.l.CIRI l.EXCL ///
l.EXCONST l.LNGDPCAP l.LNPOP ///
l.LNOILGAS l.ARMCON i.l.AUTOC i.YEAR i.REGION ///
, vce(r)
 
****Table AIV****
	
*Model 13
xtpcse CIRI l.CIRI l.LNEXCL ///
l.EXCONST l.LNGDPCAP l.LNPOP ///
l.LNOILGAS l.ARMCON i.YEAR i.REGION ///
, p het

*Model 14
xtpcse CIRI l.CIRI l.EXCL ///
l.DEMOC l.LNGDPCAP l.LNPOP ///
l.LNOILGAS l.ARMCON i.YEAR i.REGION ///
, p het

*Model 15
xtpcse CIRI l.CIRI l.EXCL ///
l.XPOL l.LNGDPCAP l.LNPOP ///
l.LNOILGAS l.ARMCON i.YEAR i.REGION ///
, p het

*Model 16
xtpcse CIRI l.CIRI l.EXCL ///
l.EXCONST l.LNGDPCAP l.LNPOP ///
l.LNOILGAS l.ARMCON l.INTWAR i.YEAR i.REGION ///
, p het

*Model 17
xtpcse CIRI l.CIRI l.EXCL ///
l.EXCONST l.LNGDPCAP l.LNPOP ///
l.LNOILGAS l.ARMCON l.YOUTH i.YEAR i.REGION ///
, p het

*Model 18
xtpcse CIRI l.CIRI l.EXCL ///
l.EXCONST l.LNGDPCAP l.LNPOP ///
l.LNOILGAS l.ARMCON l.JUDIND i.YEAR i.REGION ///
, p het
